package com.example.demo.common.code;

public enum ExecuteFlag {
    S("S", "成功"),
    F("F", "失败"),
    U("U", "未知"),
    L("L", "慢方法"),
    P("P", "执行中");

    private String code;
    private String desc;

    private ExecuteFlag(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ExecuteFlag getByCode(String code) {
        ExecuteFlag[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            ExecuteFlag param = var1[var3];
            if (param.getCode().equals(code)) {
                return param;
            }
        }

        return null;
    }

    public String getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }
}
